package net.jmchilton.spring.collect.spec;

import org.springframework.util.ClassUtils;

/**
 * This class contains static utility methods to ease 
 * use of reflection.
 * 
 * @author John Chilton
 */
class ReflectionUtils {
  
  /**
   * Runtime exception only variant of the getClass method
   * found in Spring's ClassUtils class.
   * 
   * @param name Fully qualified name of the class to obtain
   * @return Class object for given class name
   */
  static Class<?> getClass(final String name) {
    try {
      return ClassUtils.forName(name);
    } catch(final ClassNotFoundException e) {
      throw new IllegalStateException(e);
    }
  }
}
